package com.xingxue.logistics.service;

import com.github.pagehelper.PageInfo;
import com.xingxue.logistics.common.vo.RestResult;
import com.xingxue.logistics.common.dto.SysUser;

import java.util.List;

/**
 * @author Kris at 2018/9/29 11:34
 */
public interface UserService {
    /**
     * 根据账号查找用户
     * @param account
     * @return
     */
    SysUser selectUserByAccount(String account);

    /**
     * 登陆校验
     * @return
     */
    RestResult<SysUser> doLogin(String account, String pwd);


    /**
     * 分页查询
     * @param id
     * @param nick
     * @param account
     * @param page
     * @param rows
     * @return
     */
    PageInfo<SysUser> searchPage(Integer id, String nick, String account, Integer page, Integer rows);


    int addUser(SysUser user);

    int updateUser(SysUser user);

    int deleteUser(int id);

    List<SysUser> search(Integer id, String nick, String account, Integer roleId, Integer notJoinRoleId);
}
